<script type='text/javascript'>
{literal}
	function loadMedicalRecordPage(sourceDiv, pageName, patientId, canEditEncounter) {
		$.ajax ({
			type: 	  'GET',
			url:	  pageName + '?set_ajax_view',
			data:     'patientId=' + patientId +
					  '&canEditEncounter=' + canEditEncounter, 
			dataType: 'html',
			beforeSend: function() {
				$('div#pageContent').hide();				
			},			
			success:  function(data) {				
				$('#' + sourceDiv).html(data).show();										
			}
		});		
	}	
	
	$(document).ready(function(){
{/literal}		
		loadMedicalRecordPage('pageContent', '../MedicalRecord/display', {$patientId}, {$canEditEncounter});				
{literal}				
	});
{/literal}
</script>
<input id="treatmentInstanceId" type="hidden" value=""></input>
<div class='patientInfo' align='center'>
	<span>
		<span class='greenInfo' id='patientName'>{$patientName}</span> -  
		<span class='greenInfo' id='patientDob'>{translate p1=$patientDob p2=$patientAge}%s (Age %s){/translate}</span> - 
		{translate}ID{/translate}: <span class='greenInfo'>{$patientCode}</span> 
		<!-- - {translate}Latest examination{/translate}: <span class='greenInfo' id='lastExam'>{$lastExam}</span>  -->
	</span>
</div>

<div style='width: 100%;'>
	<div id='pageContent'>
	</div>	
</div>

